home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / PROGRAMM / CC_C / 0151.ZIP / ZAPLOAD.DOC < prev   
Text File  |  1983-09-08  |  9KB  |  260 lines

  1. .he ZAPLOAD- Binary to Intel Hex (c) T. Jennings 1980, 1981, 1982 Page #
  2.  
  3.  
  4.      ZAPLOAD- MSDOS version
  5.  
  6.     ZAPLOAD  can  be  used  to convert any  file  (binary  is ì
  7. assumed)  to  INTEL  hex  format,   and  send  to  one  or   more ì
  8. destinations:  a  disk file,  the punch device,  or the  printer. ì
  9. There  are  many options to select various things;  ones or  twos ì
  10. complement checksums,  where to send the hex, specifying the load ì
  11. and start addresses, etc. All of the available options are listed ì
  12. below, followed by a more detailed description of each. 
  13.  
  14.     The  very  last section deals with connecting  a  Sunrise ì
  15. Electronics ZAP-80 EPROM burner to a computer via ZAPLOAD,  since ì
  16. that was it's original intent.
  17.  
  18.     ZAPLOAD  gives  a  quick list  and  description  of  it's ì
  19. commands when operated improperly. To get this list, type ZAPLOAD ì
  20. without  any  command line options.  You will also get  the  list ì
  21. whenever you make any command errors.
  22.  
  23. .pa
  24.  
  25.  
  26.     Zapload  is executed from an MSDOS system,  and  converts ì
  27. MSDOS files from the disk,  to INTEL hex format.  All options are ì
  28. specified  on the command line when ZAPLOAD is run.  ZAPLOAD  has ì
  29. the following syntax:
  30.  
  31.     ZAPLOAD <file to convert> <any legal options ...>
  32.  
  33.  
  34.     After  ZAPLOAD has sent the entire file,  it will display ì
  35. on  the console a 16 bit two's complement checksum of every  data ì
  36. byte sent.  This checksum is of the data bytes only.  This can be ì
  37. used  in  conjunction  with the  destination  device  to  provide ì
  38. another check of data integrity.
  39.  
  40.     An  INTEL hex file consists of one or more data  records, ì
  41. followed  by  an  end  of file record.  These  records  have  the ì
  42. following format:
  43.  
  44.     DATA RECORDS: : bb llll tt dd dd dd .... cc
  45.  
  46.     : says this is the start of a record,
  47.     bb is the number of data bytes to follow,
  48.     llll is the address to load the data byte at,
  49.     tt is the record type, 00 for data,
  50.     dd dd ... are the data bytes,
  51.     cc is the checksum of bb llll tt and all dd data
  52.     bytes.
  53.  
  54.     END OF FILE RECORDS: : bb ssss tt cc
  55.  
  56.     : is the same as a data record,
  57.     bb is zero, (no data),
  58.     ssss is the program start address,
  59.     tt is 01 to indicate end of file,
  60.     cc is the checksum of bb ssss and tt. 
  61.  
  62.     There are no data bytes.
  63.  
  64.     After  the cc bytes have been sent,  a CR LF sequence  is ì
  65. sent  for readability.  Programs that read INTEL hex  ignore  any ì
  66. characters before the :,  and after the cc checksum.  Or at least ì
  67. are supposed to.
  68.  
  69.     If  you specify no options at all,  ZAPLOAD processes the ì
  70. file but does not send the output anywhere. The following are the ì
  71. defaults for Intel Hex generation:
  72.  
  73.     - 32 byte data records (20 hex),
  74.     - 2's complement checksums,
  75.     - Initial load address of 0,
  76.     - Start address of 0.
  77. .pa
  78.  
  79.  
  80.     ZAPLOAD OPTIONS
  81.  
  82.     There  are  many options;  these fall  roughly  into  two ì
  83. categories;  those  that  control  the record  format,  for  non-ì
  84. standard devices (damn them) and those that control where to send ì
  85. it as it is generated.
  86.  
  87.     Options are specified on the command line,  following the ì
  88. filename.  Each option is a single letter,  and may appear in any ì
  89. order. Some options take an additional argument; like setting the ì
  90. load  address.  In  these cases the argument follows  the  option ì
  91. letter, seperated by one or more spaces, like so:
  92.  
  93.     ZAPLOAD file l 8000
  94.  
  95.     Option  letters may be optionally preceded by  a  -,  for ì
  96. UNIX freaks, like so:
  97.  
  98.     ZAPLOAD file -l 8000
  99.  
  100.     RECORD FORMAT OPTIONS
  101.  
  102.     b <hex number>
  103.     Set  the number of bytes sent per record from the default ì
  104. 20  hex  to <hex number>.  <hex number> must be less  than  1024. ì
  105. Please do not use 0. (BUG: ZAPLOAD will not catch a byte count of ì
  106. zero.  It  might  try to produce 65535  byte  records,  and  bomb ì
  107. everything.)
  108.  
  109.     z
  110.     Generate  ones  complement  checksums instead  of  two's. ì
  111. Obscure option for use with non-standard devices.
  112.  
  113.     l <hex number>
  114.     Set  the load address to <hex number>.  The default is  0 ì
  115. hex if this option is not used.  The load address for each record ì
  116. sent will increment by the byte count.
  117.  
  118.     r <hex number>
  119.     Change the default run address of 0 to <hex number>. This ì
  120. is used only in the end of file record,  to indicate the starting ì
  121. address of the file just sent.  Things like EPROM burners do  not ì
  122. use this; some computers with download facilities might.
  123. .pa
  124.  
  125.  
  126.     FILE DESTINATION CONTROLS
  127.  
  128.     The following options control where the file is sent, and ì
  129. how it is sent. If none of these are specified, it is merely sent ì
  130. to  the  console.  Each  record is always typed on  the  console, ì
  131. character by character,  as it is sent,  unless the 'X' option is ì
  132. given.  Running ZAPLOAD with only the 'X' option would cause  the ì
  133. file  to be sent nowhere at all.  (Why?) A control-Z  terminating ì
  134. character  is  sent to the destination device after the  file  is ì
  135. transferred.
  136.  
  137.     a
  138.     Send to the aux device.  This could also be done via  the ì
  139. 'f' option: f AUX. See below.
  140.  
  141.  
  142.     f <file name>
  143.     Create a file <file name>, and send each byte there. This ì
  144. can be used to generate INTEL hex disk to disk, without using any ì
  145. external devices. 
  146.  
  147.     w <decimal number>
  148.  
  149.     Software  delay by <decimal number> after each  character ì
  150. is sent.  This can be used for those poorly designed devices that ì
  151. require  but  do not use character by  character  handshake.  The ì
  152. default here is 0, obviously, and 10 is about 50 milliseconds for ì
  153. a  4MHz  Z80.  This  was necessary for the ZAP-80,  as is  has  a ì
  154. software UART, and takes too long to process a byte to keep up. 
  155.  
  156.     Pretty useless with disk files.
  157.  
  158.     e <decimal number>
  159.  
  160.     Software  delay after the CR LF sequence at the end of  a ì
  161. record.  Some loaders require more time at the end of the record, ì
  162. in order to generate and check the checksum. The delay w <decimal ì
  163. number> is still done after sending the last cc byte,  but not on ì
  164. the CR LF sequence.
  165.  
  166. .pa
  167.  
  168.     General Controls
  169.  
  170.     s <dddd>
  171.  
  172.     Skip  <dddd> decimal bytes at the beginning of  the  file ì
  173. before processing.  This is useful when generating HEX files from ì
  174. CP/M .CMD files or the like that have a header at the beginning.
  175.  
  176.     o
  177.     e
  178.  
  179.     Process  only  even or odd numbered bytes.  This is  very ì
  180. useful when generating EPROM code for 16 bit processors like  the ì
  181. 8086,  that  have  even bytes in one PROM,  and the odd  ones  in ì
  182. another. By using the form:
  183.  
  184.     zapload file.cmd s 128 e f low.hex
  185.     and
  186.     zapload file.cmd s 128 o f hi.hex
  187.  
  188.     You  can  make the two EPROM files necessary for an  8086 ì
  189. bootstrap ROM, or whatever.
  190.  
  191.     x
  192.  
  193.     List output on the console. All hex records generated are ì
  194. typed.
  195.  
  196. .pa
  197.  
  198.     TYPICAL USAGE
  199.  
  200.     Here  are  some examples for loading INTEL  hex  to  some ì
  201. common devices:
  202.  
  203.     zapload test.com x
  204.     This  loads  test.com to the console,  and sends 32  byte ì
  205. records, load address of 0, start address of zero.
  206.  
  207.     zapload test.com e 10 w 10
  208.     This  loads  a ZAP80 tied to the  punch  port,  with  the ì
  209. necessary software delays to accomodate the ZAP80. 
  210.  
  211.     zapload test.com f test.hex
  212.     Convert  file  test.com  to  hex,  and make  a  hex  file ì
  213. test.hex. This "undoes" Digital Research's LOAD utility. 
  214.  
  215.     zapload test.com l 100 r 100 p f test.hex x
  216.     Convert test.com to Intel hex,  send it to the CP/M  PUN: ì
  217. device,  to the disk file TEST.HEX,  and listing it on ì
  218. the console. The load address starts at 100h, and the run address ì
  219. is 100h.
  220. .pa
  221.  
  222.     Connecting the ZAP-80 to FIDO or any other computer
  223.  
  224.     You  will  not find this data in any Sunrise  Electronics ì
  225. documentation.  The ZAP80 is filled with bugs,  and the manual is ì
  226. terrible.
  227.  
  228.     - The ZAP80 requires 300 baud,  1 1/2 stop bits.  Idiots. ì
  229. Use two stop bits.
  230.  
  231.     - The ZAP 80 cannot be run faster than 300 baud,  and can ì
  232. not handle even this without software delays.
  233.  
  234.     - Though  they  claim  that  it  uses  the  RTS  line  or ì
  235. whatever, it really does not. 
  236.  
  237.     - Even  though each record may be loading  properly,  the ì
  238. display  will  always say there is a load error after  the  first ì
  239. record.  Ignore  it,  and once the entire file is  sent,  do  the ì
  240. following:
  241.  
  242.     Reset  the ZAP80,  and checksum the entire data ares just ì
  243. sent.  (CKSM key,  then the lower and upper  addresses).  Compare ì
  244. this  to  the data checksum typed by ZAPLOAD.  If the  last  four ì
  245. digits are the same, all is well. (It usually is)
  246.  
  247.     HARDWARE CONNECTIONS
  248.  
  249.     -Use  a typical 3 wire connection,  swapping pins 2 and 3 ì
  250. until it works. (Necessary on FIDO, and done in it's cable).
  251.  
  252.     -On the ZAP80, tie pins 4 and 5 together. (Fool RTS)
  253.  
  254.  
  255.     Don't forget to set FIDO's punch port,  TUART port B,  to ì
  256. 300 baud 2 stop bits.
  257.  
  258.  
  259.         END OF MANUAL
  260.